# Replication Code for Identifying Price Informativeness
## Eduardo Davila and Cecilia Parlatore, Code edited by Dean Parker

The main project folder contains two subfolders (`functions` and `import_data`) and thirteen R source/markdown files. The import data subfolder has four R source files.

All other folders will be automatically created by the code.

Instructions:

1. Insert FRED key, WRDS Username, and WRDS Password in the relevant files in import_data/input. **Be sure to delete these values if you share with others.**

2. Run files:
   - If using RStudio, open by double clicking the .Rproj file. Then, open `00_stocks_main.R` and ensure that the `download_data` variable is set to `T` or `TRUE` if this is the first time running the project. This will download the raw data from WRDS and FRED. Then, either "source" the file or Ctrl-A + Run
   - If not using RStudio, open `00_stocks_main.R` in your favorite text editor and ensure that the `download_data` is set correctly as described above. Then, navigate to the containing directory in the command line and run `Rscript.exe 00_stocks_main.R` assuming you have R set on your system path.

Comments:

- A complete run of the code generates all the figure and tables in the paper.
- Opening source files by themselves and not using the project file may lead to issues with the directory and locating files. This is because R determines project location at startup, and so the solution is to close RStudio, then open with the steps described above. Using the command line does not have this issue because startup is the same as invocation in that case.